﻿namespace Ganss.Excel.Tests.Data
{
    class Product
    {
        public string Name { get; set; }

        [Column("Number")]
        public int NumberInStock { get; set; }

        public decimal Price { get; set; }

        public string Value { get; set; }

        public override bool Equals(object obj)
        {
            if (obj is not Product o) return false;
            return o.Name == Name && o.NumberInStock == NumberInStock && o.Price == Price && o.Value == Value;
        }

        public override int GetHashCode()
        {
            return (Name + NumberInStock + Price + Value).GetHashCode();
        }
    }
}